//导入mongoose包
const mongoose = require('mongoose')

//定义文档结构
const UserSchema = new mongoose.Schema({
    username: String,
    password: String,
    email: String,
    time: String
})

//创建users集合对象
const UserModel = mongoose.model('users', UserSchema)

//数据暴露
module.exports = UserModel